
@model UserModel

@{
    ViewBag.Title = "Register";
}

<h1>Account <span>Creation</span></h1>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <div>

        <div class="editor-field">
            @Html.EditorFor(m => m.User.Email)
            @Html.ValidationMessageFor(m => m.User.Email)
        </div>

        <div class="editor-field">
            @Html.EditorFor(m => m.User.FirstName)
            @Html.ValidationMessageFor(m => m.User.FirstName)
            @Html.EditorFor(m => m.User.LastName)
            @Html.ValidationMessageFor(m => m.User.LastName)
        </div>

        <div class="editor-field">
            @Html.EditorFor(m => m.User.LastName)
            @Html.ValidationMessageFor(m => m.User.LastName)
        </div>

        <div class="editor-field"> 
            @Html.DropDownList("User.ClientID", (SelectList) ViewBag.ClientList, "None")
            @Html.ValidationMessageFor(m => m.User.ClientID)
        </div>
            
        <div class="editor-field">
            @Html.EditorFor(m => m.Password)
            @Html.ValidationMessageFor(m => m.Password)
        </div>

        <div class="editor-field">
            @Html.EditorFor(m => m.ConfirmPassword)
            @Html.ValidationMessageFor(m => m.ConfirmPassword)
        </div>

		<div class="editor-field">
            @Html.ListBoxFor(m=>m.User.Roles, (SelectList) ViewBag.RoleList)
            @Html.ValidationMessageFor(m => m.User.Roles)
        </div>

        <p>
            <input type="submit" value="Register" />
        </p>
    </div>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
